package com.test.rm.controller;

import com.test.rm.service.AtService;
import com.test.rm.service.TccService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class RmController {

    @Autowired
    AtService atService;

    @Autowired
    TccService tccService;

    @PostMapping("/at-insert")
    public String insert(@RequestBody Map<String, String> params) {
        return atService.insert(params);
    }

    @PostMapping("/tcc-insert")
    public String insertTcc(@RequestBody Map<String, String> params) {
        return tccService.insert(null, params);
    }

}
